package com.sweetpotato.service;

public class StoneScissorClothlmpl implements StoneScissorCloth {
    /**
     * @param person
     * @param computer
     * @Description: 石头剪刀布游戏规则
     * 对应人的输赢平，0-输，1-赢，2-平
     */
    @Override
    public int gameStandardOfPerson(int person, int computer) {
        int result = 0;
        switch (person) {
            case 0:
                if(computer == 0){
                    result =2;
                    System.out.println("平局");
                }else if(computer == 1){
                    result = 1;
                    System.out.println("赢");
                }else if(computer == 2){
                    result =0;
                    System.out.println("输");
                }else{
                    System.out.println("非法输出");
                }
                break;
                    case 1:break;
            case 2:break;
            default:
        }
        return result;
    }

    @Override
    public int gameStandard(int person, int computer) {
        return 0;
    }
}
